import request from "@/utils/request";

// 查询产品分类树
export function getCategoryTreeApi() {
  return request({
    url: "/category/getCategoryTree",
    method: "post",
    data: {},
  });
}

// 新增产品分类
export function addCategoryApi(data) {
  return request({
    url: "/category/addCategory",
    method: "post",
    data,
  });
}

// 更新产品分类
export function updateCategoryApi(data) {
  return request({
    url: "/category/updateCategory",
    method: "post",
    data,
  });
}

// 删除产品分类
export function deleteCategoryApi(data) {
  return request({
    url: "/category/deleteCategory",
    method: "post",
    data,
  });
}
